home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-03 | 1000 b | 29 lines | [TEXT/ALFA] |
- Writing Tzu Tools
- Tzu/3 for CodeWarrior
- ©1994 Chris K. Thomas. All Rights Reserved.
-
- Tzu Tools are simple to write. The enclosed sample projects make good
- templates.
-
- Your main() function should be declared thusly:
-
- C/++:
- pascal void main(Handle theTextHandle);
-
- Pascal:
- PROCEDURE main (theText: Handle);
-
- ... where theTextHandle is a locked handle to the currently selected
- text. It's yours to manipulate. Just be sure to lock it before
- returning if you unlock it.
-
- The tool's resource file is guaranteed to be open, so go ahead and use
- any resources as you might like.
-
- Yes, this is too simplistic. It doesn't provide for error checking, for
- one thing. It also doesn't provide any mechanisms for preferences.
- These will be fixed in future releases. (But simple mode will still be
- supported - it's easier to write simple first, then add fancy stuff..)
-
- The code resource type is 'Tool', the file type is 'Tool', the creator
- is ' tZu' (space-t-Z-u), the code resource id is 0 (zero).